package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.WlConfigFieldssetting;
import com.ysd.lis.request.wl.WlConfigSettingParam;
import com.ysd.lis.service.lab.WlConfigFieldssettingService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 标本列表信息配置 前端控制器
 * </p>
 *
 * @author WangHao
 * @since 2024-01-18
 */
@RestController
@RequestMapping("/lab/wlConfigFieldssetting")
public class WlConfigFieldssettingController extends BaseController {

    @Autowired
    private WlConfigFieldssettingService configFieldssettingService;

    @ApiOperation("通过配置id获取标本列表信息")
    @GetMapping("/findFieldssettingByConfigId")
    public Result findFieldssettingByConfigId(WlConfigSettingParam wlConfigParam) {
        return configFieldssettingService.findFieldssettingByConfigId(wlConfigParam);
    }
    @ApiOperation("新增或修改标本列表信息")
    @PostMapping("/savaOrUpdateFieldssetting")
    public Result savaOrUpdateFieldssetting(@RequestBody List<WlConfigFieldssetting> configFieldssetting) {
        return configFieldssettingService.savaOrUpdateFieldssetting(configFieldssetting);
    }

}
